1. Field
The present invention relates to software test sequences and, more particularly, to post-compilation software test sequences.
2. Background Information
The proliferation of software piracy, viruses, and hacking has created a need for secure mechanisms for testing instruction sequences and preserving their integrity.
One approach employed by existing virus scanning programs is to test the instruction sequence each time the instruction sequence is loaded for execution. The test takes the form of a verification of the sequence to confirm that the sequence has not been altered. An encrypted hash value is appended to the instruction sequence and each time the sequence is loaded for execution, a hash value is computed on the sequence and compared with the encrypted hash value. If the values match, the sequence is verified and permitted to execute. A disadvantage of this approach is that it employs a separate program to test the sequence. This separate program may be installed on each data processing device which executes the sequence, or else the sequence will be untested in some environments. Another disadvantage of this approach is that once the sequence is loaded in memory, a third party may modify the sequence in memory and alter its intended execution. Testing is performed only at load time, so that execution-time modifications are not detected. For example, third parties might load a game program with a registration checker, and then bypass the registration checker by modifying the game instruction sequence in memory after it has been loaded.
Some schemes for protecting instruction sequences involve the entire sequence encrypted with a key. Only special programs with an associated key may decrypt the program for loading in this approach. These schemes suffer from similar drawbacks as the prior art virus checker discussed above—each data processing device on which the sequence runs includes the special loading program, and once the sequence is in memory, it may be subject to alteration.
Other testing schemes cause control of the sequence of instructions to be transferred to a test module during execution of the sequence, the test module to perform a test on the sequence (for example, to test the integrity of the instructions in the sequence for alterations). A disadvantage of this approach is that it may be relatively simple for a third party to modify the instruction sequence in memory to bypass the test module. It would be desirable to implement a scheme in which it would be difficult for a third party to bypass the test module.
Still other testing schemes involve access to the source code of the sequence to be tested, to determine points at which the test module may be invoked. It may not always be possible to access source code, especially when the sequence to test is not created by the same party performing the test.